import request from '@/utils/request';

export function getAllClue(current, limit, query) {
  const query2 = {};
  Object.assign(query2, query);
  return request({
    url: `/api-clue/clue/getAllCol?current=${current}&limit=${limit}`,
    method: 'post',
    data: query2
  });
}
// 全部提借
export function getAllcollection(
  collectionName,
  collectionId,
  classificationNumber
) {
  const query2 = {};
  Object.assign(query2, collectionName, collectionId, classificationNumber);
  return request({
    url: `/museum-clue/clue/collectionInUse?collectionName=${collectionName}&collectionId=${collectionId}&classificationNumber=${classificationNumber}`,
    method: 'post',
    data: query2
  });
}
// 我的提借单
export function myBorrow(staffId, state) {
  const query2 = {};
  Object.assign(query2, staffId, state);
  return request({
    url: `/museum-clue/clue/myBorrow?staffId=${staffId}&state=${state}`,
    method: 'post',
    data: query2
  });
}
// 添加提借
export function addToBorrow(staffId, state) {
  const query2 = {};
  Object.assign(query2, staffId, collectionId);
  return request({
    url: `/museum-clue/clue/addToBorrow?staffId=${staffId}&collectionId=${collectionId}`,
    method: 'post',
    data: query2
  });
}
addToBorrow;

export function getCLueInfo(clueId) {
  return request({
    url: `/api-clue/clue/clueInfo/${clueId}`,
    method: 'post'
  });
}
